//
//  NoteBookViewController.m
//  DaJiang
//
//  Created by sally on 16/10/25.
//  Copyright © 2016年 jiniu. All rights reserved.
//

#import "FeedbackView.h"
#import "NoteBookViewController.h"
#import "UIViewController+BackButtonHandler.h"

@interface NoteBookViewController ()

@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;
@property (weak, nonatomic) IBOutlet UILabel *contentLabel;

@end

@implementation NoteBookViewController

- (void)viewDidLoad {
  [super viewDidLoad];
  //TODO: 内容高度需要计算，而非写死
  CGFloat moreHeight = 170;
  self.contentLabel.height = ScreenHeight + moreHeight;
  self.scrollView.contentSize = CGSizeMake(ScreenWidth, ScreenHeight + moreHeight + GNormalMargin * 2);
}

//重写返回功能
- (BOOL)navigationShouldPopOnBackButton {
  [self.navigationController popViewControllerAnimated:YES];
  FeedbackView *feedbackView = [[FeedbackView alloc] initWithFeedbackType:FeedbackType_Notebook];
  feedbackView.isReadBtn.selected = YES;
  feedbackView.becomeExpertModel = [[CacheManager shareInstance]getBecomeExpert];
  [feedbackView show];
  return NO;
}

@end
